package com.heima.apis.user;

import com.heima.model.common.dtos.PageResponseResult;
import com.heima.model.user.dtos.AuthDto;
import com.heima.model.user.pojos.ApUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient("leadnews-user")
public interface IUserClient {

    /**
     * 用户审核--查询列表
     * @param dto
     * @return
     */
    @PostMapping("/api/v1/feign/auth/list")
    PageResponseResult findAuthList(@RequestBody AuthDto dto);

    /**
     * 用户审核失败
     * @param dto
     */
    @PostMapping("/api/v1/feign/auth/authFail")
    void authFail(@RequestBody AuthDto dto);

    /**
     * 用户审核成功
     * @param dto
     */
    @PostMapping("/api/v1/feign/auth/authPass")
    void authPass(@RequestBody AuthDto dto);

    @GetMapping("/api/v1/feign/user/get/{id}")
    ApUser findApUser(@PathVariable Integer id);
}
